<?php
class DelEnum extends Action {
	/*
	 * (non-PHPdoc) @see Action::execute()
	 */
	public function execute($params) {
		check_login ( ADMIN_LOGIN_PAGE );
		$data ['success'] = false;
		$eid = irqst ( 'eid' );
		if (empty ( $eid )) {
			$data ['msg'] = '枚举编号为空，无法删除';
		} else {
			$eM = new WebEnumModel ();
			$rst = $eM->delete ( $eid );
			if ($rst !== false) {
				$data ['success'] = true;
			} else {
				$data ['msg'] = '删除枚举出错:' . $eM->last_error_msg ();
			}
		}
		return new JsonView ( $data );
	}
}